<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        div:nth-child(1){
            /*传统盒子模型（默认的）*/
            /*box-sizing: content-box;*/
            /*盒子=width+padding+border*/
            width: 200px;
            height: 200px;
            background-color: pink;
            padding: 10px;
            border: 10px solid red;
        }
        div:nth-child(2){
            /*有了这句话就让盒子变成CSS3盒子模型*/
            /*padding和border不会再撑大盒子了*/
            width: 200px;
            height: 200px;
            background-color: skyblue;
            border: 10px solid blue;
            padding: 10px;
            box-sizing: border-box;
        }
    </style>
</head>
<body>
<div></div>
<div></div>
</body>
</html>